/**
 * [getOneDateWeekIndex 获得指定的某天所在该月的第几周，下标从0开始]
 * @param  {[Date]} date [指定的日期，非必填，默认为当天]
 * @return {[Int]}      [在该月的第几周]
 */
export function getOneDateWeekIndex(date) {
    date = date ? date : new Date();
    let monthDays = getCalendarMonth(date);
    let dateString = getFormatDateStr(date, '/', true, false, false);
    let returnDate = monthDays.filter(item => {
        return item.date === dateString;
    });
    let weekIndex = returnDate[0].weekIndex;
    return weekIndex ? weekIndex : 0;
}
